package cn.com.yang.egg;

import java.io.Serializable;

/**
 * @Desc<重载方法优先级>
 * @Author 杨亿金
 * @Date 2021/1/15 8:50
 * @CopyRight
 * @Version
 */
public class EggOverLoad {
    public static void sayHello(Object arg){
        System.out.println("hello Object");
    }
    public static void sayHello(int arg){
        System.out.println("hello int");
    }
    public static void sayHello(long arg){
        System.out.println("hello long");
    }
    public static void sayHello(Character arg){
        System.out.println("hello Character");
    }
    public static void sayHello(char arg){
        System.out.println("hello char");
    }
    public static void sayHello(char...args){
        System.out.println("hello char...");
    }
    public static void sayHello(Serializable arg){
        System.out.println("hello serializable");
    }

    /**
     * char>int>long>float>double> ...>可变长参数
     * 高->低
     * @param args
     */
    public static void main(String[] args) {
        sayHello("a");
    }
}
